package net.betou.cms.dao.assist;

import java.util.List;

import net.betou.cms.entity.assist.CmsComment;
import net.betou.common.hibernate3.Updater;
import net.betou.common.page.Pagination;


public interface CmsCommentDao{
	public Pagination getPage(Integer siteId, Integer contentId,
			Integer greaterThen, Boolean checked, boolean recommend,
			boolean desc, int pageNo, int pageSize, boolean cacheable);

	public List<CmsComment> getList(Integer siteId, Integer contentId,
			Integer greaterThen, Boolean checked, boolean recommend,
			boolean desc, int count, boolean cacheable);

	public CmsComment findById(Integer id);

	public int deleteByContentId(Integer contentId);

	public CmsComment save(CmsComment bean);

	public CmsComment updateByUpdater(Updater<CmsComment> updater);

	public CmsComment deleteById(Integer id);

	public Pagination getPageForMember(Integer siteId, Integer contentId,Integer toUserId,Integer fromUserId,
			Integer greaterThen, Boolean checked, Boolean recommend,
			boolean desc, int pageNo, int pageSize,boolean cacheable);

	public List<CmsComment> getListForDel(Integer siteId, Integer userId,
			Integer commentUserId, String ip);
	
	
	/**
	 * 查询评论
	 * @param queryContentTitle		文档标题
	 * @param queryCommentIp		评论IP
	 * @param checked						是否审核
	 * @param recommend					是否推荐
	 * @param siteId							站点ID
	 * @param order							排序字段
	 * @param cacheable					是否缓存
	 * @param ups								顶的次数
	 * @param pageNo						页数
	 * @param pageSize						每页显示多少条
	 * @return
	 */
	public Pagination getPage( String queryContentTitle, 
												   String queryCommentIp, 
												   Boolean checked, 
												   Boolean recommend,  
												   Integer siteId, 
												   Integer order, 
												   Boolean cacheable,
												   Short ups,
												   int pageNo,
												   int pageSize);
}